package com.wc.ttt;

/**
 * @ClassName:DemoTest
 * @Author: 鹿建文
 * @Date: 2022/3/23  - 16:09
 * @Describe:
 */
public class DemoTest {
    public static void main(String[] args) {
        CalculatorContext ccx = new CalculatorContext();
              ccx.setCalculator(new AddCalculator());
        System.out.println(ccx.cal(10, 5));
            ccx.setCalculator(new jianfa());
        System.out.println(ccx.cal(10 , 5));
         ccx.setCalculator(new chengfa());
        System.out.println(ccx.cal(10, 5));


    }
}
